<template>
    <div class="addProject business-workAdd">
        <div class="addForm zll-form">
            <el-row :gutter="40">
                <el-col :span="8">
                    <div class="text-formList">
                        <span class="text_left">客户：</span>
                        <span class="text_right">{{ addForm.data1 }}</span>
                    </div>
                    <div class="text-formList">
                        <span class="text_left">发货单号：</span>
                        <span class="text_right">{{ addForm.data2 }}</span>
                    </div>
                </el-col>
                <el-col :span="8">
                    <div class="text-formList">
                        <span class="text_left">派单日期：</span>
                        <span class="text_right">{{ addForm.data3 }}</span>
                    </div>
                    <div class="text-formList">
                        <span class="text_left">司机：</span>
                        <span class="text_right">{{ addForm.data4 }}</span>
                    </div>
                </el-col>
                <el-col :span="8">
                    <div class="text-formList"></div>
                    <div class="text-formList">
                        <span class="text_left">发货状态：</span>
                        <span class="text_right">{{ addForm.data5 }}</span>
                    </div>
                </el-col>
            </el-row>
            <div class="tableList" style="margin-top: 0;">
                <table border="1">							
                    <tr>																					
                        <th>订单号</th>
                        <th>品类</th>
                        <th>产品名称</th>
                        <th width="200">规格</th>
                        <th>单件万支</th>
                        <th>计发件数</th>
                    </tr>
                    <tr v-if="addForm.tableData.length == 0" class="noData"><td colspan="6">暂无数据</td></tr>
                    <tr v-else class="add_Table" v-for="(item, index) in addForm.tableData"  :key="index">
                        <td><p>{{ item.data1 }}</p></td>
                        <td><p>{{ item.data2 }}</p></td>
                        <td><p>{{ item.data3 }}</p></td>
                        <td width="200"><p>{{ item.data4 }}</p></td>
                        <td><p>{{ item.data5 }}</p></td>
                        <td><p>{{ item.data6 }}</p></td>
                    </tr>
                </table>
            </div>
            <div class="nav_list">
                <div class="_title"><i class="el-icon-s-promotion"></i>出库</div>
                <div v-if="type == 'edit'">
                    <p style="text-align: center;">任务已收到，司机还没来哦</p>
                </div>
                <div v-else>
                    <el-row :gutter="40"  class="tableList">
                        <el-col :span="8">
                            <div class="text-formList">
                                <span class="text_left">出库类型：</span>
                                <span class="text_right">{{ addForm.data6 }}</span>
                            </div>
                            <div class="text-formList">
                                <span class="text_left">出库号：</span>
                                <span class="text_right">{{ addForm.data7 }}</span>
                            </div>
                        </el-col>
                        <el-col :span="8">
                            <div class="text-formList">
                                <span class="text_left">出库状态：</span>
                                <span class="text_right">{{ addForm.data8 }}</span>
                            </div>
                            <div class="text-formList">
                                <span class="text_left">出库日期：</span>
                                <span class="text_right">{{ addForm.data8 }}</span>
                            </div>
                        </el-col>
                        <el-col :span="8">
                            <div class="text-formList">
                                <span class="text_left">备注：</span>
                                <span class="text_right">{{ addForm.data9 }}</span>
                            </div>
                            <div class="text-formList">
                                <span class="text_left">出库人：</span>
                                <span class="text_right">{{ addForm.data10 }}</span>
                            </div>
                        </el-col>
                    </el-row>
                    <div class="tableList" style="margin-top: 0;">
                        <table border="1">							
                            <tr>																					
                                <th>订单号</th>
                                <th>品类</th>
                                <th>产品名称</th>
                                <th>规格</th>
                                <th>出库件数</th>
                            </tr>
                            <tr  class="add_Table">
                                <td><p>{{ addForm.data1 }}</p></td>
                                <td><p>{{ addForm.data2 }}</p></td>
                                <td><p>{{ addForm.data3 }}</p></td>
                                <td><p>{{ addForm.data4 }}</p></td>
                                <td><p>{{ addForm.data5 }}</p></td>
                            </tr>
                            <tr>
                                <td colspan="4">合计</td>
                                <td><p>112</p></td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>

export default {
    props: ['editData','type'],
    data(){
        return {
            addForm: {
                data1:'',
                data2:'',
                tableData:[{data4:'4.5*115*5'},{data4:'4.5*115*5'}],
            },
            tableLoading:true, //table刷新
            tableData: [{},{},{}],
            tableHeader:[],
        }
    },
    methods: {
		submitForm(val,type) {
			let self = this;
            self.$eventBus.$emit("updateWorkList");
		},
        getList() {
            this.tableLoading = true;
            setTimeout(()=>{									
                this.tableHeader =  [																																					
                        {"columnValue": "tableNum1", "columnName": "出库号" },
                        {"columnValue": "tableNum3", "columnName": "品类" },
                        {"columnValue": "tableNum4", "columnName": "规格",width:200 },
                        {"columnValue": "tableNum5", "columnName": "单件万支" },
                        {"columnValue": "tableNum6", "columnName": "箱号"},
                    ]
                this.tableData = JSON.parse(JSON.stringify(this.tableData))
                this.tableLoading = false;
            },500)
        },
    },
    mounted(){
        this.getList()
    },
    components: {},
}
</script>
<style lang="scss" scoped>
@import "@/style/dialog.scss";
.dc {
    width: 100px;
    background: #e6a23c;
}
.nav_list {
    margin-top: 20px;
    ._title {
        line-height: 40px;
        color: #00D1D0;
        i {
            font-size: 16px;
            margin-right: 5px;
        }
    }
}
</style>